package com.link.base.ext.emp.dao.mybatis.mapper;

import com.link.base.ext.emp.model.EmpPosition;
import com.link.core.basic.dao.mapper.BasicMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 职位员工中间对象-
 *
 * @author 刘启鑫
 * @date 2020/09/03 16:51
 */
public interface EmpPositionMapper extends BasicMapper<EmpPosition> {

    /**
     * 根据员工ID删除员工职位中间表数据
     *
     * @author 刘启鑫
     * @date 2020/9/3 17:07
     */
    void deleteEmpPostnByEmpId(EmpPosition empPosition);

    /**
     * 批量新建
     *
     * @author 刘启鑫
     * @date 2020/9/10 14:58
     */
    void insertBatch(@Param("empPositionList") List<EmpPosition> empPositionList);

    /**
     * 根据员工ID删除员工职位中间表数据
     * 且批量新建数据
     *
     * @author 刘启鑫
     * @date 2020/9/10 15:23
     */
    void deleteByEmpIdAndInsertBatch(@Param("empId") Long empId, @Param("empPositionList") List<EmpPosition> empPositionList);

}
